import { Controller, Body, Get, Post } from '../core'
import {AppDto} from "./app-dto";
import {Validate} from "./validate";
import { AppService } from './app-service'


@Controller('app')
export class AppController {
  constructor(private readonly service: AppService) {
  }

  @Post('name')
  getName(@Body(Validate) req: AppDto) {
    return '我的名字是' + this.service.reverse(req.name)
  }
}